package com.zhiyizhen.callnumber.common.view.adapter.recyclerview;

import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

public abstract class BaseViewHolder<T> extends RecyclerView.ViewHolder {

    protected BaseViewHolder(BaseAdapter<T, ? extends BaseViewHolder<T>> adapter, View itemView) {
        super(itemView);
        itemView.setOnClickListener(adapter);
    }

    /**
     * 需要把位置传下去 使用bindData(T data, int position)
     */
    public void bindData(T data) {
    }

    public void bindData(T data, int position) {
        bindData(data);
    }

}
